package com.bupt.vueblog.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author 谭继好
 * @Description 仅仅用于向数据库中插入数据，查询返回带有是否点赞和收藏的VO对象
 * @date 2024-04-09 08:22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BriefArticle {

    private Integer id;
    private Integer userId;
    private String title;
    private Integer likeNum;
    private Integer collectNum;
    private Integer commentNum;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    // 虽然有deleted字段，但不用显示，SQL语句会带deleted = 0和deleted = 1
    // 以区分是否删除。0表示删除，1表示未删除
}
